\(\int \frac {(d+e x)^n}{x^2 (a+c x^2)} \, dx\) [369]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 20, antiderivative size = 207 \[ \int \frac {(d+e x)^n}{x^2 \left (a+c x^2\right )} \, dx=\frac {c (d+e x)^{1+n} \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {\sqrt {c} (d+e x)}{\sqrt {c} d-\sqrt {-a} e}\right )}{2 (-a)^{3/2} \left (\sqrt {c} d-\sqrt {-a} e\right ) (1+n)}-\frac {c (d+e x)^{1+n} \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {\sqrt {c} (d+e x)}{\sqrt {c} d+\sqrt {-a} e}\right )}{2 (-a)^{3/2} \left (\sqrt {c} d+\sqrt {-a} e\right ) (1+n)}+\frac {e (d+e x)^{1+n} \operatorname {Hypergeometric2F1}\left (2,1+n,2+n,1+\frac {e x}{d}\right )}{a d^2 (1+n)} \]

[Out]

e*(e*x+d)^(1+n)*hypergeom([2, 1+n],[2+n],1+e*x/d)/a/d^2/(1+n)+1/2*c*(e*x+d)^(1+n)*hypergeom([1, 1+n],[2+n],(e*
x+d)*c^(1/2)/(-e*(-a)^(1/2)+d*c^(1/2)))/(-a)^(3/2)/(1+n)/(-e*(-a)^(1/2)+d*c^(1/2))-1/2*c*(e*x+d)^(1+n)*hyperge
om([1, 1+n],[2+n],(e*x+d)*c^(1/2)/(e*(-a)^(1/2)+d*c^(1/2)))/(-a)^(3/2)/(1+n)/(e*(-a)^(1/2)+d*c^(1/2))

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 207, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {975, 67, 726, 70} \[ \int \frac {(d+e x)^n}{x^2 \left (a+c x^2\right )} \, dx=\frac {c (d+e x)^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {\sqrt {c} (d+e x)}{\sqrt {c} d-\sqrt {-a} e}\right )}{2 (-a)^{3/2} (n+1) \left (\sqrt {c} d-\sqrt {-a} e\right )}-\frac {c (d+e x)^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {\sqrt {c} (d+e x)}{\sqrt {c} d+\sqrt {-a} e}\right )}{2 (-a)^{3/2} (n+1) \left (\sqrt {-a} e+\sqrt {c} d\right )}+\frac {e (d+e x)^{n+1} \operatorname {Hypergeometric2F1}\left (2,n+1,n+2,\frac {e x}{d}+1\right )}{a d^2 (n+1)} \]

[In]

Int[(d + e*x)^n/(x^2*(a + c*x^2)),x]

[Out]

(c*(d + e*x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, (Sqrt[c]*(d + e*x))/(Sqrt[c]*d - Sqrt[-a]*e)])/(2*(-a)
^(3/2)*(Sqrt[c]*d - Sqrt[-a]*e)*(1 + n)) - (c*(d + e*x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, (Sqrt[c]*(d
 + e*x))/(Sqrt[c]*d + Sqrt[-a]*e)])/(2*(-a)^(3/2)*(Sqrt[c]*d + Sqrt[-a]*e)*(1 + n)) + (e*(d + e*x)^(1 + n)*Hyp
ergeometric2F1[2, 1 + n, 2 + n, 1 + (e*x)/d])/(a*d^2*(1 + n))

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/(b^(
n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 726

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m, 1/(a + c*x^2
), x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IntegerQ[m]

Rule 975

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (ILtQ[m, 0] && ILtQ[n, 0])) &&  !(IGtQ[m, 0] || IGtQ[n, 0])

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {(d+e x)^n}{a x^2}-\frac {c (d+e x)^n}{a \left (a+c x^2\right )}\right ) \, dx \\ & = \frac {\int \frac {(d+e x)^n}{x^2} \, dx}{a}-\frac {c \int \frac {(d+e x)^n}{a+c x^2} \, dx}{a} \\ & = \frac {e (d+e x)^{1+n} \, _2F_1\left (2,1+n;2+n;1+\frac {e x}{d}\right )}{a d^2 (1+n)}-\frac {c \int \left (\frac {\sqrt {-a} (d+e x)^n}{2 a \left (\sqrt {-a}-\sqrt {c} x\right )}+\frac {\sqrt {-a} (d+e x)^n}{2 a \left (\sqrt {-a}+\sqrt {c} x\right )}\right ) \, dx}{a} \\ & = \frac {e (d+e x)^{1+n} \, _2F_1\left (2,1+n;2+n;1+\frac {e x}{d}\right )}{a d^2 (1+n)}-\frac {c \int \frac {(d+e x)^n}{\sqrt {-a}-\sqrt {c} x} \, dx}{2 (-a)^{3/2}}-\frac {c \int \frac {(d+e x)^n}{\sqrt {-a}+\sqrt {c} x} \, dx}{2 (-a)^{3/2}} \\ & = \frac {c (d+e x)^{1+n} \, _2F_1\left (1,1+n;2+n;\frac {\sqrt {c} (d+e x)}{\sqrt {c} d-\sqrt {-a} e}\right )}{2 (-a)^{3/2} \left (\sqrt {c} d-\sqrt {-a} e\right ) (1+n)}-\frac {c (d+e x)^{1+n} \, _2F_1\left (1,1+n;2+n;\frac {\sqrt {c} (d+e x)}{\sqrt {c} d+\sqrt {-a} e}\right )}{2 (-a)^{3/2} \left (\sqrt {c} d+\sqrt {-a} e\right ) (1+n)}+\frac {e (d+e x)^{1+n} \, _2F_1\left (2,1+n;2+n;1+\frac {e x}{d}\right )}{a d^2 (1+n)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.25 (sec) , antiderivative size = 167, normalized size of antiderivative = 0.81 \[ \int \frac {(d+e x)^n}{x^2 \left (a+c x^2\right )} \, dx=\frac {(d+e x)^{1+n} \left (-\frac {c \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {\sqrt {c} (d+e x)}{\sqrt {c} d-\sqrt {-a} e}\right )}{\sqrt {-a} \sqrt {c} d+a e}+\frac {c \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {\sqrt {c} (d+e x)}{\sqrt {c} d+\sqrt {-a} e}\right )}{\sqrt {-a} \sqrt {c} d-a e}+\frac {2 e \operatorname {Hypergeometric2F1}\left (2,1+n,2+n,1+\frac {e x}{d}\right )}{d^2}\right )}{2 a (1+n)} \]

[In]

Integrate[(d + e*x)^n/(x^2*(a + c*x^2)),x]

[Out]

((d + e*x)^(1 + n)*(-((c*Hypergeometric2F1[1, 1 + n, 2 + n, (Sqrt[c]*(d + e*x))/(Sqrt[c]*d - Sqrt[-a]*e)])/(Sq
rt[-a]*Sqrt[c]*d + a*e)) + (c*Hypergeometric2F1[1, 1 + n, 2 + n, (Sqrt[c]*(d + e*x))/(Sqrt[c]*d + Sqrt[-a]*e)]
)/(Sqrt[-a]*Sqrt[c]*d - a*e) + (2*e*Hypergeometric2F1[2, 1 + n, 2 + n, 1 + (e*x)/d])/d^2))/(2*a*(1 + n))

Maple [F]

\[\int \frac {\left (e x +d \right )^{n}}{x^{2} \left (c \,x^{2}+a \right )}d x\]

[In]

int((e*x+d)^n/x^2/(c*x^2+a),x)

[Out]

int((e*x+d)^n/x^2/(c*x^2+a),x)

Fricas [F]

\[ \int \frac {(d+e x)^n}{x^2 \left (a+c x^2\right )} \, dx=\int { \frac {{\left (e x + d\right )}^{n}}{{\left (c x^{2} + a\right )} x^{2}} \,d x } \]

[In]

integrate((e*x+d)^n/x^2/(c*x^2+a),x, algorithm="fricas")

[Out]

integral((e*x + d)^n/(c*x^4 + a*x^2), x)

Sympy [F(-1)]

Timed out. \[ \int \frac {(d+e x)^n}{x^2 \left (a+c x^2\right )} \, dx=\text {Timed out} \]

[In]

integrate((e*x+d)**n/x**2/(c*x**2+a),x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {(d+e x)^n}{x^2 \left (a+c x^2\right )} \, dx=\int { \frac {{\left (e x + d\right )}^{n}}{{\left (c x^{2} + a\right )} x^{2}} \,d x } \]

[In]

integrate((e*x+d)^n/x^2/(c*x^2+a),x, algorithm="maxima")

[Out]

integrate((e*x + d)^n/((c*x^2 + a)*x^2), x)

Giac [F]

\[ \int \frac {(d+e x)^n}{x^2 \left (a+c x^2\right )} \, dx=\int { \frac {{\left (e x + d\right )}^{n}}{{\left (c x^{2} + a\right )} x^{2}} \,d x } \]

[In]

integrate((e*x+d)^n/x^2/(c*x^2+a),x, algorithm="giac")

[Out]

integrate((e*x + d)^n/((c*x^2 + a)*x^2), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {(d+e x)^n}{x^2 \left (a+c x^2\right )} \, dx=\int \frac {{\left (d+e\,x\right )}^n}{x^2\,\left (c\,x^2+a\right )} \,d x \]

[In]

int((d + e*x)^n/(x^2*(a + c*x^2)),x)

[Out]

int((d + e*x)^n/(x^2*(a + c*x^2)), x)